﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using KerriganDataContract.Person;
using System.ComponentModel;

namespace KerriganDataContract.Intructor
{
    [DataContract]
    public class InstructorDC : INotifyPropertyChanged
    {
        private Int32 _IdInstructorDC;
        private PersonDC _Person;
        private string _FullName;
        
        [DataMember]
        public Int32 IdInstrutorDC
        {
            get { return this._IdInstructorDC; }
            set { this._IdInstructorDC = value; OnPropertyChanged("IdInstrutorDC"); }
        }

        [DataMember]
        public PersonDC Person
        {
            get { return this._Person; }
            set { this._Person = value; OnPropertyChanged("Person"); }
        }

        [DataMember]
        public string FullName
        {
            get { return this._FullName; }
            set { this._FullName = value; OnPropertyChanged("FullName"); }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }
    }
}
